# Contributor: Edd Salkield <edd@salkield.uk>
# Maintainer: Edd Salkield <edd@salkield.uk>
pkgname=swayhide
pkgver=0.2.1
pkgrel=2
pkgdesc="A window swallower for swaywm"
url="https://github.com/NomisIV/swayhide/"
arch="all !s390x !riscv64" # rust
license="GPL-3.0-only"
makedepends="cargo cargo-auditable"
source="https://github.com/NomisIV/swayhide/archive/v$pkgver/swayhide-v$pkgver.tar.gz
	cargo-update.patch
	"

prepare() {
	default_prepare
	cargo fetch --target="$CTARGET" --locked
}

build() {
	cargo auditable build --release --frozen
}

check() {
	cargo test --frozen
}

package() {
	cargo auditable install --locked --offline --path . --root="$pkgdir/usr"
	rm "$pkgdir"/usr/.crates*
}

sha512sums="
4c7c9d5138d827faddf63bdd80895d89e583b11a034087e62ff31f07b0c32d1f1990b1c8d8a1104dd6e1dae0ba77353456ffa762c5bc535e753c63bba1ac4f17  swayhide-v0.2.1.tar.gz
d57f3334f5ffbf16a2d37650e18ec6165bb879c35449dbd2a7e04743377e4d1b25f813ca134f4afd0b1676db456f71016f7938da8b5be7bc2110bcf6f8a5841b  cargo-update.patch
"
